import re


def read_template(template_path):
    with open(template_path, 'r') as template:
        return template.read()


def parse_rules(llm_output: str) -> list[str]:
    pattern = r'\d+\. (.+)'
    match = re.findall(pattern, llm_output)
    if match:
        return match
    else:
        raise ValueError(f'Could not find Suricata Rules.')
